package com.ve.compiler;

import android.content.Context;
import android.os.Environment;
import android.widget.Toast;

import com.ve.utils.FileUtils;

import java.io.File;
import java.io.IOException;

public class ExampleInstaller {

    public static void install(Context context){
        File dir = getDir();
        if (dir.exists()){
            return;
        }
        try {
            dir.mkdirs();
            FileUtils.unZip(context.getAssets(), "example.zip", dir.getAbsolutePath(), false);
        } catch (IOException e) {
            e.printStackTrace();
        }


    }
    public static File getDir(){
        return new File(Environment.getExternalStorageDirectory(), "C51");
    }
}
